package com.thb.pay.api.sys;


import com.thb.pay.vo.req.SysRolePermissionReq;
import com.thb.pay.vo.resp.SysPermissionVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * <p>
 * 系统-授权表 前端控制器
 * </p>
 *
 * @author lucky
 * @since 2019-07-21
 */
@FeignClient(value = "pay-service", fallbackFactory = SysPermissionServiceApiFallbackFactory.class)
@RequestMapping("/sysPermissionApi")
public interface SysPermissionServiceApi {

    @RequestMapping(value = "/findPermissionListByRoleId", method = RequestMethod.GET)
    List<SysPermissionVo> findPermissionListByRoleId(@RequestParam("roleId") Long roleId);

    @RequestMapping(value = "/saveRolePermissions", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE)
    void saveRolePermissions(@RequestBody SysRolePermissionReq rolePermissionReq);
}
